package com.liuym.admin;

import com.alibaba.dubbo.config.spring.context.annotation.DubboComponentScan;
import com.liuym.common.exception.AdminException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, DataSourceTransactionManagerAutoConfiguration.class})
@ComponentScan({"com.liuym"})
@DubboComponentScan(basePackages = "com.liuym.admin.dubbo.impl")
@EnableTransactionManagement
public class GradeAdminApplication {
    public static ConfigurableApplicationContext context;
    private static Logger logger = LoggerFactory.getLogger(GradeAdminApplication.class);

    public static void main(String[] args) throws AdminException {

        context = SpringApplication.run(GradeAdminApplication.class);
        logger.info("server is running......");

    }


}
